package kolekcje.powtorka.trzecia;

public class ZwuerzakiArgument {

	public static void main(String[] args) {

		new ZwuerzakiArgument().go();
	}

	private void go() {
		Animal[] animals = {new Cat(), new Dog(), new Dog()};
		Dog[] dogs = {new Dog(), new Dog(), new Dog()};
		
		nakarm(animals);
		System.out.println("\nTeraz psy");
		nakarm(dogs);
	}

	private void nakarm(Animal[] animals) {
		animals[0] = new Dog();
		animals[0] = new 	Cat();
		for(Animal e: animals)
			e.eat();
	}

}
